﻿<Window x:Class="BattleFury.Loader.Views.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Battle Fury" Width="480" Height="240" 
		WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
    <Grid>
        <Grid.RowDefinitions>
			<RowDefinition Height="4"/>
			<RowDefinition Height="24"/>
			<RowDefinition Height="24"/>
			<RowDefinition Height="24"/>
			<RowDefinition/>
			<RowDefinition Height="24"/>
			<RowDefinition Height="24"/>
			<RowDefinition Height="4"/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="4"/>
			<ColumnDefinition/>
			<ColumnDefinition Width="128"/>
			<ColumnDefinition Width="128"/>
			<ColumnDefinition Width="4"/>
			<ColumnDefinition/>
			<ColumnDefinition Width="4"/>
		</Grid.ColumnDefinitions>
		
		<TextBlock Grid.Row="1" Grid.Column="1" Text="Username:"/>
		<TextBox Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Text="{Binding Username, Mode=TwoWay}"/>
		<CheckBox Grid.Row="1" Grid.Column="5" Content="Spectator?" IsChecked="{Binding IsSpectator, Mode=TwoWay}" VerticalAlignment="Center"/>

		<TextBlock Grid.Row="2" Grid.Column="1" Text="Host:"/>
		<TextBox Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Text="{Binding Host, Mode=TwoWay}"/>

		<TextBlock Grid.Row="3" Grid.Column="1" Text="Port"/>
		<TextBox Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Text="{Binding Port, Mode=TwoWay}"/>
		
		<TextBlock Grid.Row="4" Grid.Column="1" Text="Bots:"/>
		<ListBox Grid.Row="4" Grid.Column="2" Grid.RowSpan="2" SelectedValue="{Binding SelectedLoadedBot, Mode=TwoWay}" ItemsSource="{Binding LoadedBots, Mode=TwoWay}">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<TextBlock Text="{Binding Name}"/>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
		<Grid Grid.Row="6" Grid.Column="2" Grid.ColumnSpan="2">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="24"/>
				<ColumnDefinition Width="*"/>
				<ColumnDefinition Width="24"/>
			</Grid.ColumnDefinitions>
			<Button Grid.Column="0" Content="&lt;=" Command="{Binding RemoveBotCommand}"/>
			<Button Grid.Column="2" Content="=&gt;" Command="{Binding AddBotCommand}"/>
		</Grid>

		<ListBox Grid.Row="4" Grid.Column="3" Grid.RowSpan="2" ItemsSource="{Binding SelectedBots, Mode=TwoWay}" SelectedValue="{Binding SelectedBot, Mode=TwoWay}">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<TextBlock Text="{Binding Name}"/>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>

		<Button Grid.Row="5" Grid.Column="5" Height="24" VerticalAlignment="Bottom" Content="Create Client" Command="{Binding CreateClientCommand}"/>
		<Button Grid.Row="6" Grid.Column="5" Content="Create Server" Command="{Binding CreateServerCommand}"/>
    </Grid>
</Window>
